package org.spring.springboot.app.onlinepay.service;

import org.spring.springboot.app.onlinepay.domain.po.OnlinePayPO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 *  线上支付接口类
 */


public interface IOnlinePayService {

    /**
     * 创建线上订单
     * @param onlinePayPO
     * @return
     */
    int save(OnlinePayPO onlinePayPO);

    /**
     * 支付宝处理异步回调
     * @param request
     * @param response
     * @param validatelist
     * @param successState
     * @param title
     */
    void doAlipay(HttpServletRequest request, HttpServletResponse response, List<String> validatelist, String successState, String title);

    /**
     * 微信处理异步回调
     * @param request
     * @param response
     * @param validatelist
     * @param successState
     * @param title
     */
    void doWeiXin(HttpServletRequest request, HttpServletResponse response,List<String> validatelist,String successState,String title);

    /**
     *
     * @param id
     * @return
     */
    int checkPayState(String id);

    /**
     *
     * @param type
     * @return
     */
    String getJsonData(int type);

    /**
     *
     * @param id
     * @return
     */
    OnlinePayPO selectByPrimaryKey(String id);
}
